package com.fort.teachermanagementsys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fort.teachermanagementsys.entity.SysRole;
import com.fort.teachermanagementsys.entity.User;
import com.fort.teachermanagementsys.utils.Result;
import org.springframework.security.core.Authentication;

import java.util.List;

public interface UserService extends IService<User> {


    Result register(String username, String password);

    public User getUserByUsername(String username,String password);

    List<SysRole> getAuthorities(String username);

    List<User> getAllUsers();

    Result updatePassword(String newPassword,String Password,String rePassword, Authentication authentication);

    void deleteUser(Integer id);

    void assignRoles(Integer userId, List<Integer> roleIds);

    List<Integer> getRoleIdsByUserId(Integer id);

    User getUserById(Integer id);
}
